

package io.dshubs.archives.feign.fallback;

import io.dshubs.archives.dto.ArchiveBaseCategoryDto;
import io.dshubs.archives.feign.ArchivesFeignClient;
import io.dshubs.commons.tools.utils.Result;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

import javax.validation.constraints.NotNull;
import java.util.List;


/**
 * @author tan
 */
@Component
public class ArchivesFeignClientFallbackFactory implements FallbackFactory<ArchivesFeignClient> {

    @Override
    public ArchivesFeignClient create(Throwable cause) {
        return new ArchivesFeignClient() {
            @Override
            public Result deleteByCode(@NotNull(message = "批量删除id不能为空") List<Long> ids) {
                return null;
            }

            @Override
            public Result<ArchiveBaseCategoryDto> getById(Long id) {
                return null;
            }

        };
    }
}